SUPPORT / SAMPLES & SAS NOTES
 

Support

Problem Note 57730: A custom format that is permanently assigned to a variable cannot be updated in the same SAS® Studio session

DetailsAboutRate It

A custom format that is permanently assigned to a variable in a DATA step in SAS Studio cannot be updated in the same session.

The code below illustrates an example. If you create a custom format called WFM, assign it as a permanent format to a variable in a DATA step and print the data set, the results are printed correctly.

proc format lib=libref;
   value wfm
      low-100 = 'low'
      other = 'high'
   ;
run;

data class;
   set sashelp.class;
   format weight wfm.;
run;

proc print data=class (obs=5);
   var name weight;
run;

If you then change the custom format definition and print the same data set, the updated format is not used.

proc format lib=libref;
   value wfm
      low-100 = 'L'
      other = 'H'
   ;
run;

proc print data=class (obs=5);
   var name weight;
run;

You must exit or reset your SAS Studio session in order to apply the updated format.

To circumvent the problem, use the format in a procedure step rather than permanently assigning it to the variable. For example:

proc format lib=work;
   value wfm
      low-100 = 'low'
      other = 'high'
   ;
run;

data class;
   set sashelp.class;
run;

proc print data=class (obs=5);
   format weight wfm.;
   var name weight;
run;

When you use a format in a procedure step, any changes to the format definition are reflected in the results in the same session.



Operating System and Release Information

Product FamilyProductSystemProduct ReleaseSAS Release
ReportedFixed*ReportedFixed*
SAS SystemSAS StudioMicrosoft Windows 8 Pro 32-bit3.43.49.4 TS1M39.4 TS1M4
Microsoft Windows 8 Pro x643.43.49.4 TS1M39.4 TS1M4
Microsoft Windows 8.1 Enterprise 32-bit3.43.49.4 TS1M39.4 TS1M4
Microsoft Windows 8.1 Enterprise x643.43.49.4 TS1M39.4 TS1M4
Microsoft Windows 8.1 Pro 32-bit3.43.49.4 TS1M39.4 TS1M4
Microsoft Windows 8.1 Pro x643.43.49.4 TS1M39.4 TS1M4
Microsoft Windows 103.43.49.4 TS1M39.4 TS1M4
Microsoft Windows Server 20083.43.49.4 TS1M39.4 TS1M4
Microsoft Windows Server 2008 R23.43.49.4 TS1M39.4 TS1M4
Microsoft Windows Server 2008 for x643.43.49.4 TS1M39.4 TS1M4
Microsoft Windows Server 2012 Datacenter3.43.49.4 TS1M39.4 TS1M4
Microsoft Windows Server 2012 R2 Datacenter3.43.49.4 TS1M39.4 TS1M4
Microsoft Windows Server 2012 R2 Std3.43.49.4 TS1M39.4 TS1M4
Microsoft Windows Server 2012 Std3.43.49.4 TS1M39.4 TS1M4
Windows 7 Enterprise 32 bit3.43.49.4 TS1M39.4 TS1M4
Windows 7 Enterprise x643.43.49.4 TS1M39.4 TS1M4
Windows 7 Home Premium 32 bit3.43.49.4 TS1M39.4 TS1M4
Windows 7 Home Premium x643.43.49.4 TS1M39.4 TS1M4
Windows 7 Professional 32 bit3.43.49.4 TS1M39.4 TS1M4
Windows 7 Professional x643.43.49.4 TS1M39.4 TS1M4
Windows 7 Ultimate 32 bit3.43.49.4 TS1M39.4 TS1M4
Windows 7 Ultimate x643.43.49.4 TS1M39.4 TS1M4
64-bit Enabled AIX3.43.49.4 TS1M39.4 TS1M4
64-bit Enabled Solaris3.43.49.4 TS1M39.4 TS1M4
HP-UX IPF3.43.49.4 TS1M39.4 TS1M4
Linux for x643.43.49.4 TS1M39.4 TS1M4
Solaris for x643.43.49.4 TS1M39.4 TS1M4
Microsoft Windows 8 Enterprise x643.43.49.4 TS1M39.4 TS1M4
Microsoft Windows 8 Enterprise 32-bit3.43.49.4 TS1M39.4 TS1M4
Microsoft® Windows® for x643.43.49.4 TS1M39.4 TS1M4
* For software releases that are not yet generally available, the Fixed Release is the software release in which the problem is planned to be fixed.